﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Template2.Master" AutoEventWireup="true" CodeBehind="MyProduct.aspx.cs" Inherits="EnglishAuction.MyProduct" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script>
        $(function () {
            $("#tabs").tabs();
        });
    </script>
    <form id="Form1" runat="server">
        <br />
        <div style="font-size: 20px; padding: 10px;">
            Danh sách sản phẩm của bạn
        </div>
        <div id="tabs">
            <ul>
                <li><a href="#tabs-1">Chưa duyệt</a></li>
                <li><a href="#tabs-5">Đã duyệt</a></li>
                <li><a href="#tabs-2">Đang đấu giá</a></li>
                <li><a href="#tabs-3">Đấu giá thành công</a></li>
                <li><a href="#tabs-4">Đấu giá thất bại</a></li>
            </ul>
            <div id="tabs-1" style="text-align: left;">
                <div style="border: solid 1px; background-color: #FFF; border-radius: 5px; border-color: #CCCCCC; width: 100%;">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <br />
                                <div style="overflow: auto; width: 1000px; margin: 0 auto;">
                                    <asp:GridView ID="gvMyProduct" runat="server"
                                        AutoGenerateColumns="False"
                                        AllowPaging="True"
                                        CellPadding="4"
                                        ForeColor="#333333"
                                        OnPageIndexChanging="gvMyProduct_PageIndexChanging"
                                        OnRowDataBound="gvMyProduct_RowDataBound"
                                        HeaderStyle-BackColor="#eeeeee"
                                        Style="border: 1px solid #D8D8D8; background-color: #ffffff;"
                                        Width="100%">
                                        <Columns>
                                            <asp:TemplateField HeaderText="STT" ItemStyle-Width="30" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <%# Container.DataItemIndex + 1 %>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="TenSanPham" HeaderText="Tên Sản Phẩm"></asp:BoundField>
                                            <asp:BoundField DataField="GiaSan" DataFormatString="{0:###,###} (VNĐ)" HeaderText="Giá Sàn" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
                                                <HeaderStyle Width="120px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="ThoiGianDauGia" DataFormatString="{0} (ngày)" HeaderText="Thời gian đấu" HeaderStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
                                            <asp:BoundField DataField="NgayTao" DataFormatString="{0:hh:mm tt dd/MM/yyyy}" HeaderText="Ngày Tạo" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="140px" />
                                            </asp:BoundField>
                                            <asp:ImageField DataImageUrlField="HinhAnh" DataImageUrlFormatString="~/images/{0}" HeaderText="Hình Ảnh" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                                                <ControlStyle Height="50px" Width="50px" />
                                                <HeaderStyle Width="70px" />
                                            </asp:ImageField>

                                            <asp:HyperLinkField ItemStyle-HorizontalAlign="Center" ControlStyle-CssClass="header" HeaderText="" DataNavigateUrlFields="Id" DataNavigateUrlFormatString="EditMyProduct.aspx?Id={0}" Text="Sửa" ItemStyle-Width="60px" />
                                        </Columns>
                                        <PagerStyle BackColor="#eeeeee" ForeColor="White" HorizontalAlign="Center" />
                                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                        <EmptyDataTemplate>
                                            <div style="text-align: center;">
                                                Không có sản phẩm nào.
                                            </div>
                                        </EmptyDataTemplate>
                                    </asp:GridView>
                                </div>
                            </td>
                        </tr>

                    </table>
                    <br />
                </div>
            </div>
            <div id="tabs-5" style="text-align: left;">
                <div style="border: solid 1px; background-color: #FFF; border-radius: 5px; border-color: #CCCCCC; width: 100%;">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <br />
                                <div style="overflow: auto; width: 1000px; margin: 0 auto;">
                                    <asp:GridView ID="gvDaDuyet" runat="server"
                                        AutoGenerateColumns="False"
                                        AllowPaging="True"
                                        CellPadding="4"
                                        ForeColor="#333333"
                                        OnPageIndexChanging="gvMyProduct_PageIndexChanging"
                                        OnRowDataBound="gvMyProduct_RowDataBound"
                                        HeaderStyle-BackColor="#eeeeee"
                                        Style="border: 1px solid #D8D8D8; background-color: #ffffff;"
                                        Width="100%">
                                        <Columns>
                                            <asp:TemplateField HeaderText="STT" ItemStyle-Width="30" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <%# Container.DataItemIndex + 1 %>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="TenSanPham" HeaderText="Tên Sản Phẩm"></asp:BoundField>
                                            <asp:BoundField DataField="GiaSan" DataFormatString="{0:###,###} (VNĐ)" HeaderText="Giá Sàn" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
                                                <HeaderStyle Width="120px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="NgayTao" DataFormatString="{0:hh:mm tt dd/MM/yyyy}" HeaderText="Ngày tạo" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="140px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="ThoiGianDauGia" DataFormatString="{0} (ngày)" HeaderText="Thời gian đấu" HeaderStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
                                            <asp:BoundField DataField="NgayLenSan" DataFormatString="{0:hh:mm tt dd/MM/yyyy}" HeaderText="Ngày lên sàn" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="140px" />
                                            </asp:BoundField>
                                            <asp:ImageField DataImageUrlField="HinhAnh" DataImageUrlFormatString="~/images/{0}" HeaderText="Hình Ảnh" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                                                <ControlStyle Height="50px" Width="50px" />
                                                <HeaderStyle Width="70px" />
                                            </asp:ImageField>

                                        </Columns>
                                        <PagerStyle BackColor="#eeeeee" ForeColor="White" HorizontalAlign="Center" />
                                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                        <EmptyDataTemplate>
                                            <div style="text-align: center;">
                                                Không có sản phẩm nào.
                                            </div>
                                        </EmptyDataTemplate>
                                    </asp:GridView>
                                </div>
                            </td>
                        </tr>

                    </table>
                    <br />
                </div>
            </div>
            <div id="tabs-2" style="text-align: left;">
                <div style="border: solid 1px; background-color: #FFF; border-radius: 5px; border-color: #CCCCCC; width: 100%;">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <br />
                                <div style="overflow: auto; width: 1000px; margin: 0 auto;">
                                    <asp:GridView ID="gvDangDauGia" runat="server"
                                        AutoGenerateColumns="False"
                                        AllowPaging="True"
                                        CellPadding="4"
                                        ForeColor="#333333"
                                        OnPageIndexChanging="gvMyProduct_PageIndexChanging"
                                        OnRowDataBound="gvMyProduct_RowDataBound"
                                        HeaderStyle-BackColor="#eeeeee"
                                        Style="border: 1px solid #D8D8D8; background-color: #ffffff;"
                                        Width="100%">
                                        <Columns>
                                            <asp:TemplateField HeaderText="STT" ItemStyle-Width="30" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <%# Container.DataItemIndex + 1 %>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="TenSanPham" HeaderText="Tên Sản Phẩm"></asp:BoundField>
                                            <asp:BoundField DataField="GiaSan" DataFormatString="{0:###,###} (VNĐ)" HeaderText="Giá Sàn" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
                                                <HeaderStyle Width="120px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="NgayTao" DataFormatString="{0:hh:mm tt dd/MM/yyyy}" HeaderText="Ngày tạo" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="140px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="ThoiGianDauGia" DataFormatString="{0} (ngày)" HeaderText="Thời gian đấu" HeaderStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
                                            <asp:BoundField DataField="NgayLenSan" DataFormatString="{0:hh:mm tt dd/MM/yyyy}" HeaderText="Ngày lên sàn" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="140px" />
                                            </asp:BoundField>
                                            <asp:ImageField DataImageUrlField="HinhAnh" DataImageUrlFormatString="~/images/{0}" HeaderText="Hình Ảnh" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                                                <ControlStyle Height="50px" Width="50px" />
                                                <HeaderStyle Width="70px" />
                                            </asp:ImageField>

                                        </Columns>
                                        <PagerStyle BackColor="#eeeeee" ForeColor="White" HorizontalAlign="Center" />
                                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                        <EmptyDataTemplate>
                                            <div style="text-align: center;">
                                                Không có sản phẩm nào.
                                            </div>
                                        </EmptyDataTemplate>
                                    </asp:GridView>
                                </div>
                            </td>
                        </tr>

                    </table>
                    <br />
                </div>
            </div>
            <div id="tabs-3" style="text-align: left;">
                <div style="border: solid 1px; background-color: #FFF; border-radius: 5px; border-color: #CCCCCC; width: 100%;">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <br />
                                <div style="overflow: auto; width: 1000px; margin: 0 auto;">
                                    <asp:GridView ID="gvDauGiaThanhCong" runat="server"
                                        AutoGenerateColumns="False"
                                        CellPadding="4"
                                        ForeColor="#333333"
                                        HeaderStyle-BackColor="#eeeeee"
                                        Style="border: 1px solid #D8D8D8; background-color: #ffffff;"
                                        Width="100%">
                                        <Columns>
                                            <asp:TemplateField HeaderText="STT" ItemStyle-Width="30" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <%# Container.DataItemIndex + 1 %>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Tên sản phẩm">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="HyperLink1" runat="server" CssClass="header" NavigateUrl='<%# "DetailsProduct.aspx?Id="+Eval("SanPhamId") %>'><%#Eval("TenSanPham")%></asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="NgayLenSan" DataFormatString="{0:hh:mm tt dd/MM/yyyy}" HeaderText="Ngày lên sàn" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="140px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="GiaSan" DataFormatString="{0:###,###} (VNĐ)" HeaderText="Giá Sàn" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
                                                <HeaderStyle Width="120px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="GiaThang" DataFormatString="{0:###,###} (VNĐ)" HeaderText="Giá thắng" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
                                                <HeaderStyle Width="120px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="NguoiThang"  HeaderText="Người thắng" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="120px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="ThanhToan" HeaderText="Thanh toán?" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                                            <asp:ImageField DataImageUrlField="HinhAnh" DataImageUrlFormatString="~/images/{0}" HeaderText="Hình Ảnh" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                                                <ControlStyle Height="50px" Width="50px" />
                                                <HeaderStyle Width="70px" />
                                            </asp:ImageField>
                                        </Columns>
                                        <PagerStyle BackColor="#eeeeee" ForeColor="White" HorizontalAlign="Center" />
                                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                        <EmptyDataTemplate>
                                            <div style="text-align: center;">
                                                Không có sản phẩm nào.
                                            </div>
                                        </EmptyDataTemplate>
                                    </asp:GridView>
                                </div>
                            </td>
                        </tr>

                    </table>
                    <br />
                </div>
            </div>
            <div id="tabs-4" style="text-align: left;">
                <div style="border: solid 1px; background-color: #FFF; border-radius: 5px; border-color: #CCCCCC; width: 100%;">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <br />
                                <div style="overflow: auto; width: 1000px; margin: 0 auto;">
                                    <asp:GridView ID="gvDauGiaThatBai" runat="server"
                                        AutoGenerateColumns="False"
                                        AllowPaging="True"
                                        CellPadding="4"
                                        ForeColor="#333333"
                                        HeaderStyle-BackColor="#eeeeee"
                                        Style="border: 1px solid #D8D8D8; background-color: #ffffff;"
                                        Width="100%">
                                        <Columns>
                                            <asp:TemplateField HeaderText="STT" ItemStyle-Width="30" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <%# Container.DataItemIndex + 1 %>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Tên sản phẩm">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="HyperLink1" runat="server" CssClass="header" NavigateUrl='<%# "DetailsProduct.aspx?Id="+Eval("Id") %>'><%#Eval("TenSanPham")%></asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="GiaSan" DataFormatString="{0:###,###} (VNĐ)" HeaderText="Giá Sàn" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
                                                <HeaderStyle Width="120px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="NgayTao" DataFormatString="{0:hh:mm tt dd/MM/yyyy}" HeaderText="Ngày tạo" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="140px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="ThoiGianDauGia" DataFormatString="{0} (ngày)" HeaderText="Thời gian đấu" HeaderStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
                                            <asp:BoundField DataField="NgayLenSan" DataFormatString="{0:hh:mm tt dd/MM/yyyy}" HeaderText="Ngày lên sàn" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                                <HeaderStyle Width="140px" />
                                            </asp:BoundField>
                                            <asp:ImageField DataImageUrlField="HinhAnh" DataImageUrlFormatString="~/images/{0}" HeaderText="Hình Ảnh" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                                                <ControlStyle Height="50px" Width="50px" />
                                                <HeaderStyle Width="70px" />
                                            </asp:ImageField>

                                        </Columns>
                                        <PagerStyle BackColor="#eeeeee" ForeColor="White" HorizontalAlign="Center" />
                                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                        <EmptyDataTemplate>
                                            <div style="text-align: center;">
                                                Không có sản phẩm nào.
                                            </div>
                                        </EmptyDataTemplate>
                                    </asp:GridView>
                                </div>
                            </td>
                        </tr>

                    </table>
                    <br />
                </div>
            </div>
        </div>
        <br />
    </form>
</asp:Content>
